﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting;
using System.Text;

namespace com.cruxomatic.configuration.FeatureManager
{
    public class FeatureManagerFactory
    {
        public static IFeatureManager GetFeatureManager()
        {
            string DLLClassInformation = CruxConfigurationManager.GetClassDetailsForFeatureManager("CruxFeatureProvider");
            string[] DllClassDetails = DLLClassInformation.Split(',');
            string ClassDetails = DllClassDetails[0].Trim();
            string DllDetails = DllClassDetails[1].Trim();

            ObjectHandle objectHandle = Activator.CreateInstance(DllDetails, ClassDetails);
            IFeatureManager featureManager = (IFeatureManager)objectHandle.Unwrap();
            return featureManager;
        }
    }
}
